import java.util.Scanner;

/**
 * Created by Salted fish
 * Description:
 * User: 24539
 * Date：2021-07-29
 * Time: 23:43
 */
public class Test1 {
    public static void main(String[] args) {
        Scanner sn = new Scanner(System.in);
        int n = sn.nextInt();
        if (n == 0) {
            System.out.println(0);
        } else {
            System.out.println(fib(n));
        }
    }
    public static int fib(int n) {
        if(n==1||n==2) {
            return 1;
        }
        int a =1;
        int b = 1;
        int c=0;
        for(int i =3;i<=n;i++) {
            c= a+b;
            a=b;
            b=c;
        }
        return c;
    }

}
